Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Displaying the new fields in the window
You’ve finished with
h-BinCheck.pand you already made the change toh-OrderCalcs.pto run it.
![]()
To change the window procedure to accept the new
OUTPUTparameters and display them:
- Add two more fill-in fields to the window and call them cWorstWH and cBestWH.
- Give them labels that describe them, such as These warehouses are unable to fill the order and This is the best US warehouse for the order.
- Go into their property sheets and make them Enabled but Read-Only, like the other fill-in fields. The default data type for fill-ins is
CHARACTER, so you don’t need to change that.- Change the
RUNstatement in theVALUE-CHANGEDtrigger to include the two newOUTPUTparameters toh-OrderCalcs.p, and to display them:
- Run the window. You see values for the Warehouses that can’t supply the Items for the Order at all and for the Warehouse that is the best source for most of the Items, if there is one:
![]()
The data in the Sports2000 database isn’t too imaginative, so the Cologne Warehouse is almost always unable to supply Items and the Northeast USA Warehouse is almost always the best one. But the values are recalculated every time you select a different Customer or a different Order.
You’ve learned a great deal in the last two chapters about how to construct complex procedures in the 4GL. Using the principles of block types, data access statements, and record buffer scoping, you can write procedures that express your application’s specialized business logic with a precision and conciseness not possible in any other programming language.
In the next chapter you go back to having some more fun. You’ll look at some of the other graphical controls Progress supports and how to manipulate them to get the user interface you want.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |